package cn.iphone.sentinel;

import cn.iphone.domain.User;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

public class GetByIdBlockHandlerClass {

    /**
     * 限流
     * @param id
     * @return
     */
    public static User getByIdBlockHandler(@PathVariable("id") Long id, BlockException blockException){
        blockException.printStackTrace();
        return new User(-1L,"限流啦lalalalalalala！");
    }
}
